package epoch.game.core.serialize;

import java.io.IOException;

/**
 * 缓冲区读取器接口
 * @author will
 * @date 2016年3月24日 上午11:23:21
 */
public interface IStreamReader {
	
	byte readByte() throws IOException;

	short readShort() throws IOException;

	int readInt() throws IOException;

	long readLong() throws IOException;
	
	float readFloat() throws IOException;
	
	double readDouble() throws IOException;

	boolean readBoolean() throws IOException;

	String readString() throws IOException;

	<T extends ISerializable> T readObject(Class<T> clasz) throws IOException;
	
	byte[] readBytes() throws IOException;
	
	char readChar() throws IOException;
	
	<T> T read() throws IOException;
}
